-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TE FP8 integration #1096
base: main
Are you sure you want to change the base?
TE FP8 integration #1096
Conversation
Signed-off-by: Sanju C Sudhakaran <[email protected]>
@@ -574,6 +574,46 @@ python3 ../gaudi_spawn.py --use_deepspeed --world_size 8 run_lora_clm.py \ | |||
--flash_attention_causal_mask True | |||
``` | |||
|
|||
- Multi-card finetuning of Llama2-70B with DeepSpeed ZeRO-3 optimization, LoRA and FP8 precision: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can just modify existing command for FP8 precision (instead of adding a new one).
@@ -291,14 +291,6 @@ class GaudiTrainingArguments(TrainingArguments): | |||
metadata={"help": "Whether to use fp8 for training."}, | |||
) | |||
|
|||
fp8_recipe_format: Optional[str] = field( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@libinta please note we deleted this because we do not want to expose low level numeric selection to user as of now. In future we can revisit this.
@regisss @libinta please help review this PR. This is a cleaned up version of TE integration (tested with Llama-7B, Llama-70B, Mixtral-7B fine-tuning tasks). Changes were done mainly for following reasons,
FYI @SanjuCSudhakaran will create another PR adding Llama-7B test for this feature. It is tested with 1.16.0 release and can be merged without waiting for 1.17.0 |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Related PR with tests #1106 |
> The following command requires Habana DeepSpeed 1.13.0 or later. | ||
|
||
```bash | ||
PT_HPU_MAX_COMPOUND_OP_SIZE=10 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we still need PT_HPU_MAX_COMPOUND_OP_SIZE=10 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a spike in the loss curve when the flag is removed, which results in a slight drop in overall accuracy for Llama2-70B.
So for now we want to keep this flag, while we investigate and fix this issue.
What does this PR do?
Refactoring
transformer_engine
FP8 support in optimum-habana. This removes model specific changes and makes the code more model agnostic.Fixes # (issue)
Before submitting